package com.ruoyi.extensionmonitor.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.extensionmonitor.domain.InfoExtensionMonitorTarget;
import com.ruoyi.extensionmonitor.mapper.InfoExtensionMonitorTargetMapper;
import com.ruoyi.extensionmonitor.service.IInfoExtensionMonitorTargetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 延伸监控指标Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-05
 */
@Service
public class InfoExtensionMonitorTargetServiceImpl implements IInfoExtensionMonitorTargetService
{
    @Autowired
    private InfoExtensionMonitorTargetMapper infoExtensionMonitorTargetMapper;

    /**
     * 查询延伸监控指标
     * 
     * @param id 延伸监控指标主键
     * @return 延伸监控指标
     */
    @Override
    public InfoExtensionMonitorTarget selectInfoExtensionMonitorTargetById(Long id)
    {
        return infoExtensionMonitorTargetMapper.selectInfoExtensionMonitorTargetById(id);
    }

    /**
     * 查询延伸监控指标列表
     * 
     * @param infoExtensionMonitorTarget 延伸监控指标
     * @return 延伸监控指标
     */
    @Override
    public List<InfoExtensionMonitorTarget> selectInfoExtensionMonitorTargetList(InfoExtensionMonitorTarget infoExtensionMonitorTarget)
    {
        return infoExtensionMonitorTargetMapper.selectInfoExtensionMonitorTargetList(infoExtensionMonitorTarget);
    }

    /**
     * 新增延伸监控指标
     * 
     * @param infoExtensionMonitorTarget 延伸监控指标
     * @return 结果
     */
    @Override
    public int insertInfoExtensionMonitorTarget(InfoExtensionMonitorTarget infoExtensionMonitorTarget)
    {
        infoExtensionMonitorTarget.setCreateTime(DateUtils.getNowDate());
        return infoExtensionMonitorTargetMapper.insertInfoExtensionMonitorTarget(infoExtensionMonitorTarget);
    }

    /**
     * 修改延伸监控指标
     * 
     * @param infoExtensionMonitorTarget 延伸监控指标
     * @return 结果
     */
    @Override
    public int updateInfoExtensionMonitorTarget(InfoExtensionMonitorTarget infoExtensionMonitorTarget)
    {
        infoExtensionMonitorTarget.setUpdateTime(DateUtils.getNowDate());
        return infoExtensionMonitorTargetMapper.updateInfoExtensionMonitorTarget(infoExtensionMonitorTarget);
    }

    /**
     * 批量删除延伸监控指标
     * 
     * @param ids 需要删除的延伸监控指标主键
     * @return 结果
     */
    @Override
    public int deleteInfoExtensionMonitorTargetByIds(Long[] ids)
    {
        return infoExtensionMonitorTargetMapper.deleteInfoExtensionMonitorTargetByIds(ids);
    }

    /**
     * 删除延伸监控指标信息
     * 
     * @param id 延伸监控指标主键
     * @return 结果
     */
    @Override
    public int deleteInfoExtensionMonitorTargetById(Long id)
    {
        return infoExtensionMonitorTargetMapper.deleteInfoExtensionMonitorTargetById(id);
    }
}
